Jump to content

Wikipedia:Reference desk/Archives/Computing/2013 April 19

From Wikipedia, the free encyclopedia
Computing desk
< April 18 << Mar | April | May >> April 20 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


April 19

[edit]

captchas

[edit]

how are the data-bases of images mapped to strings made? (and whats an "op"?) 70.114.248.114 (talk) 02:40, 19 April 2013 (UTC)[reply]

In here an OP is an original poster (or their original post). So, it's you or your question. StuRat (talk) 02:52, 19 April 2013 (UTC)[reply]
What key input is this CAPTCHA expecting?
Wikipedia's CAPTCHAs are made with mw:Extension:ConfirmEdit. In Internet discussions, "op" means original post or original poster. PrimeHunter (talk) 02:57, 19 April 2013 (UTC)[reply]

The question is an interesting one that is not answered by the CAPTCHA article. If an English word has been taken from a book and distorted so it can't be read by machine, how does the server know what input is correct? What string is mapped to the image I was presented with here? Presumably no human made a conscious decision to require me to type "λόγον" ! Sussexonian (talk) 18:13, 20 April 2013 (UTC)[reply]

From ReCAPTCHA#Operation "Any word that is deciphered differently by both OCR programs or that is not in the English dictionary is marked as "suspicious" and converted into a CAPTCHA. The suspicious word is displayed, out of context, along with a control word already known. The system assumes that if the human types the control word correctly, then the response to the questionable word is accepted as probably valid." Hot Stop (Talk) 18:24, 20 April 2013 (UTC)[reply]
With the exception of ReCAPTCHA, there's no database (images are generated on the fly) and the server simply remembers the text that it used to make the image. -- BenRG 01:12, 21 April 2013 (UTC)

Terminology question

[edit]

IS there a standard term for the highest level of DNS domain name at which cookie sharing can take place? This would be the highest level that does not appear in the public suffix list, for example within the .co.uk namespace it would be the third level domain, so news.bbc.co.uk and weather.bbc.co.uk can share cookies, but for .com names it is the second level domain, and according to the list for nsw.edu.au it is the forth level domain. Some sites incorrectly refer to this as the second level domain[1] but is there a recognised term for it. The best term that I can come up with is "first level below the effective tld portion of the name", but is there already a recognised term. -- Q Chris (talk) 11:02, 19 April 2013 (UTC)[reply]

relation between interrupt status and sleep method in java

[edit]

Hi !
--->My doubt Is on relation ship between sleep method and interrupt status flag.
--->I am asking this doubt based on below two programmes.
--->In programme1, I have called sleep method with out clearing interrupt status .Then InterruptedException was thrown.
--->In programme2 ,I have called sleep method after clearing interrupt status flag using interrupted method.
Then InterruptedException was not thrown.
Is there any relation ship between sleep method and interrupt status flag?
Does sleep method throws Interrupted exception based on interrupt status flag?



Programme1:

class even extends Thread {
  public void run() {
    for(int i=10;i<=20;i=i+2) {
      System.out.println(i);
      this.interrupt();
      try {Thread.sleep(1000);}
      catch(InterruptedException ie) {System.out.println("interrupted");
    }
  }
  public static void main(String args[]) {
    even e1=new even();
    e1.start();
  }
}

Output:

10
interrupted
12
interrupted
14
interrupted
16
interrupted
18
interrupted
20
Interrupted


Programme2:

class even extends Thread {
  public void run() {
    for(int i=10;i<=20;i=i+2) {
      System.out.println(i);
      this.interrupt();
      Thread.interrupted();
      try {Thread.sleep(1000);}
      catch(InterruptedException ie) {System.out.println("interrupted");
    }
  }
  public static void main(String args[]) {
    even e1=new even();
    e1.start();
  }
}

Output:

10
12
14
16 	
18
20




— Preceding unsigned comment added by Me shankara (talkcontribs) 15:47, 19 April 2013 (UTC)[reply]

(I reformatted your code (and combined the classes in each case) to be more legible and less long.) I gave the answer to this exact question in answer to your previous question. --Tardis (talk) 16:24, 19 April 2013 (UTC)[reply]
I also remove a few stray HTML markup that was confusing things Astronaut (talk) 16:36, 19 April 2013 (UTC)[reply]
I just love this sort of question and am full of envy of those who have ANY idea as to what it is all about!85.211.192.200 (talk) 21:34, 19 April 2013 (UTC)[reply]
(I moved your comment out of the OP and indented it.) Don't be too envious: it's not that complicated. All these examples are exploring is that a program (in this case, part of a program) can react to a signal in more than one way: by explicitly checking (#2) or by specifying a response that occurs implicitly (#1). --Tardis (talk) 16:51, 20 April 2013 (UTC)[reply]